import type { Category, CategoryList } from "@/types/category";
import { request } from "@/utils/request";

// 查询所有分类列表
export const all = () => request<CategoryList>("/category/all");
// 编辑/新增
export const save = (category: Category) => request("/category/save", "POST", category);
// 根据id删除
export const del = (id: number) => request(`/category/del/${id}`, "DELETE");
